package com.ruoyi.project.meal.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.project.meal.domain.MealMilk;
import com.ruoyi.project.meal.mapper.MealMilkMapper;
import com.ruoyi.project.meal.service.IMealMilkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.utils.text.Convert;

/**
 * 牛奶上报Service业务层处理
 * 
 * @author sky
 * @date 2024-03-20
 */
@Service
public class MealMilkServiceImpl implements IMealMilkService
{
    @Autowired
    private MealMilkMapper mealMilkMapper;

    /**
     * 查询牛奶上报
     * 
     * @param id 牛奶上报ID
     * @return 牛奶上报
     */
    @Override
    public MealMilk selectMealMilkById(Integer id)
    {
        return mealMilkMapper.selectMealMilkById(id);
    }

    /**
     * 查询牛奶上报列表
     * 
     * @param mealMilk 牛奶上报
     * @return 牛奶上报
     */
    @Override
    public List<MealMilk> selectMealMilkList(MealMilk mealMilk)
    {
        return mealMilkMapper.selectMealMilkList(mealMilk);
    }

    @Override
    public List<MealMilk> selectMealMilkCount(MealMilk mealMilk) {
        return mealMilkMapper.selectMealMilkCount(mealMilk);
    }

    @Override
    public List<MealMilk> selectMealMilkReportList(MealMilk mealMilk) {
        return mealMilkMapper.selectMealMilkReport(mealMilk);
    }

    @Override
    public List<MealMilk> selectMealMilkReportTotal(MealMilk mealMilk) {
        return mealMilkMapper.selectMealMilkReportTotal(mealMilk);
    }

    /**
     * 新增牛奶上报
     * 
     * @param mealMilk 牛奶上报
     * @return 结果
     */
    @Override
    public int insertMealMilk(MealMilk mealMilk)
    {
        return mealMilkMapper.insertMealMilk(mealMilk);
    }

    /**
     * 修改牛奶上报
     * 
     * @param mealMilk 牛奶上报
     * @return 结果
     */
    @Override
    public int updateMealMilk(MealMilk mealMilk)
    {
        return mealMilkMapper.updateMealMilk(mealMilk);
    }

    /**
     * 删除牛奶上报对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteMealMilkByIds(String ids)
    {
        return mealMilkMapper.deleteMealMilkByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除牛奶上报信息
     * 
     * @param id 牛奶上报ID
     * @return 结果
     */
    @Override
    public int deleteMealMilkById(Integer id)
    {
        return mealMilkMapper.deleteMealMilkById(id);
    }
}
